// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.Xpack;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Xpack.Json.SecurityRolesDlsBitSetCacheConverter))]
public sealed partial class SecurityRolesDlsBitSetCache
{
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	public SecurityRolesDlsBitSetCache(int count, long evictions, long hits, System.TimeSpan hitsTimeInMillis, long memoryInBytes, long misses, System.TimeSpan missesTimeInMillis)
	{
		Count = count;
		Evictions = evictions;
		Hits = hits;
		HitsTimeInMillis = hitsTimeInMillis;
		MemoryInBytes = memoryInBytes;
		Misses = misses;
		MissesTimeInMillis = missesTimeInMillis;
	}
#if NET7_0_OR_GREATER
	public SecurityRolesDlsBitSetCache()
	{
	}
#endif
#if !NET7_0_OR_GREATER
	[System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")]
	public SecurityRolesDlsBitSetCache()
	{
	}
#endif
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	internal SecurityRolesDlsBitSetCache(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel)
	{
		_ = sentinel;
	}

	/// <summary>
	/// <para>
	/// Number of entries in the cache.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	int Count { get; set; }

	/// <summary>
	/// <para>
	/// Total number of cache evictions.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	long Evictions { get; set; }

	/// <summary>
	/// <para>
	/// Total number of cache hits.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	long Hits { get; set; }

	/// <summary>
	/// <para>
	/// Total combined time spent in cache for hits in milliseconds.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	System.TimeSpan HitsTimeInMillis { get; set; }

	/// <summary>
	/// <para>
	/// Human-readable amount of memory taken up by the cache.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.ByteSize? Memory { get; set; }

	/// <summary>
	/// <para>
	/// Memory taken up by the cache in bytes.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	long MemoryInBytes { get; set; }

	/// <summary>
	/// <para>
	/// Total number of cache misses.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	long Misses { get; set; }

	/// <summary>
	/// <para>
	/// Total combined time spent in cache for misses in milliseconds.
	/// </para>
	/// </summary>
	public
#if NET7_0_OR_GREATER
	required
#endif
	System.TimeSpan MissesTimeInMillis { get; set; }
}